﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
//using System.ComponentModel.DataAnnotations.Schema;

namespace CodeCamp.Model
{
    //[Table("cc_UsersInEventRoles")]
    public class UserInEventRole
    {
        public UserInEventRole()
        {
            CreatedUTC = DateTime.UtcNow;
        }

        //[Key]
        //[ForeignKey("Role4Event")]
        //[Column(Order = 0)]
        public int Role4EventId { get; set; }

        [Required]
        public virtual Role4Event Role4Event { get; set; }

        //[Key]
        //[ForeignKey("SiteUser")]
        //[Column(Order = 0)]
        public int SiteUserId { get; set; }

        [Required]
        public virtual SiteUser SiteUser { get; set; }

        //[ForeignKey("Event")]
        public int EventId { get; set; }

        [Required]
        public virtual Event Event { get; set; }

        [Required]
        public DateTime CreatedUTC { get; protected set; }

        [Required]
        [MaxLength(128)]
        public string CreatedBy { get; set; }
    }
}
